package cn.sykj.car.common;

import cn.sykj.car.entity.ConfigBankAccount;

public enum StatusCode {

    /*
        错误码格式说明（示例：202001）
        --------------------------------------------------------------------
        服务级错误（1为系统级错误）	服务模块代码(即业务模块标识)	具体错误代码
                2                            02	                    001
        --------------------------------------------------------------------
    */

    /*常用的状态码，业务模块的状态码请勿添加在此处，而应该是在各个业务模块定义，格式如上*/
    OK(200, "操作成功！"),//成功
    OK_FAIL(201, "操作失败！"),//成功

    IS_NULL(300,"参数为空！"),// 判断参数为空

    NOT_FOUND(404,"参数不存在！"),


    ROLE_NAME_REPEAT(601,"角色名称已存在！"),
    UN_AUTHORIZED(602,"无权限！"),
    ROLE_EXIST_USER(60301,"该角色已绑定用户！不能删除！"),
    ROLE_EXIST_MENU(60302,"该角色已绑定菜单或操作权限！不能删除！"),
    ROLE_NOT_FOUND(604,"角色不存在！"),

    OPERATION_NAME_REPEAT(701,"权限名称已存在！"),
    OPERATION_CODE_REPEAT(702,"权限格式已存在！"),
    OPERATION_NOT_FOUND(704,"权限记录不存在！"),

    USER_NAME_REPEAT(801,"用户名称已存在！"),
    USER_PWD_ERROR(802,"用户密码修改时，必须填写原密码，且原密码必须正确！"),
    USER_DELETE(803,"用户已删除！如继续使用，请联系管理员恢复账号！"),
    USER_NOT_FOUND(804,"用户不存在！"),
    OPERATION_VALUE_MUST_CONTAIN_VIEW(805,"操作权限必须包含查询权限"),
    USER_MEMBER_LEVEL_IS_NOT_NULL(806,"用户等级不能为空"),
    USER_MEMBER_LEVEL_IS_SAME(807,"当前修改的会员等级与原等级一致，不能修改"),

    MENU_NAME_REPEAT(901,"菜单名称已存在！"),
    MENU_URL_REPEAT(902,"菜单路径已存在！"),
    MENU_PATH_NAME_REPEAT(905,"菜单路径名称已存在！"),
    MENU_COMPONENT_REPEAT(906,"文件路径名称已存在！"),
    MENU_EXIST_SUB(903,"菜单存在子级，请先删除子级！"),
    MENU_NOT_FOUND(904,"菜单不存在！"),
    IMPORT_FAIL(1010,"数据导入失败！"),
    IMPORT_EXT_FAIL(1011,"Excel文件格式错误！"),
    DISTRIBUTE_OVER(2001,"超出可分配金额！"),
    DISTRIBUTE_UNALLOCATED(2002,"还有剩余金额未分配！"),
    IT_CANT_BE_NEGATIVE(2003,"数据不能为负数"),
    THIS_DATA_IS_AVAILAVLE(2004,"已有该条数据"),
    PERFORMANCE_NOT_FOUND(2005,"数据未找到"),


    GOODS_CATEGORY_SEQ_NOT_NULL(102004,"商品分类排序不能为空"),


    //附件
    FILE_INFO_NOT_FOUND(190001,"附件文本不存在"),
    FILE_CATEGORY_NOT_FOUND(190002,"附件文本所属类型不能为空"),

    // 门店信息
    CAR_STORE_NOT_FOUND(11000001,"门店信息不存在！"),
    CAR_STORE_CHECKED(11000002,"门店已审核或审批驳回！"),

    //银行信息
    CONFIG_BANK_ACCOUNT_NOT_FOUND(12000000,"该银行信息不存在"),
    CONFIG_RECHARGE_NOT_FOUND(12300000,"充值记录不存在")

    ;


	
	
    /*状态码*/
    private int code;
    /*信息*/
    private String msg;

    StatusCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
